home *** CD-ROM | disk | FTP | other *** search
- head 1.3;
- branch ;
- access ;
- symbols sprited:1.3.1;
- locks ; strict;
- comment @ * @;
-
-
- 1.3
- date 91.09.12.23.38.50; author mottsmth; state Exp;
- branches 1.3.1.1;
- next 1.2;
-
- 1.2
- date 88.07.29.17.41.05; author ouster; state Exp;
- branches ;
- next 1.1;
-
- 1.1
- date 88.06.19.14.32.09; author ouster; state Exp;
- branches ;
- next ;
-
- 1.3.1.1
- date 91.12.10.16.29.25; author kupfer; state Exp;
- branches ;
- next ;
-
-
- desc
- @@
-
-
- 1.3
- log
- @truncate was returning Sprite ReturnStatus, not Unix errno
- as it's supposed to.
- @
- text
- @/*
- * truncate.c --
- *
- * Procedure to map from Unix truncate system call to Sprite system call.
- *
- * Copyright 1986 Regents of the University of California
- * All rights reserved.
- */
-
- #ifndef lint
- static char rcsid[] = "$Header: /sprite/src/lib/c/unixSyscall/RCS/truncate.c,v 1.2 88/07/29 17:41:05 ouster Exp Locker: mottsmth $ SPRITE (Berkeley)";
- #endif not lint
-
- #include "sprite.h"
-
- #include "compatInt.h"
- #include <errno.h>
-
-
- /*
- *----------------------------------------------------------------------
- *
- * truncate --
- *
- * Procedure to map from Unix truncate system call to Sprite
- * system call.
- *
- * Results:
- * UNIX_SUCCESS is returned, or
- * UNIX_ERROR with errno set appropriately.
- *
- * Side effects:
- * None.
- *
- *----------------------------------------------------------------------
- */
-
- int
- truncate(path, length)
- char *path;
- unsigned long length;
- {
- ReturnStatus status = SUCCESS;
-
- status = Fs_Truncate(path, (int) length);
- if (status == SUCCESS) {
- return(UNIX_SUCCESS);
- } else {
- errno = Compat_MapCode(status);
- return(UNIX_ERROR);
- }
- }
- @
-
-
- 1.3.1.1
- log
- @Initial branch for Sprite server.
- @
- text
- @d11 1
- a11 1
- static char rcsid[] = "$Header: /sprite/src/lib/c/unixSyscall/RCS/truncate.c,v 1.3 91/09/12 23:38:50 mottsmth Exp $ SPRITE (Berkeley)";
- @
-
-
- 1.2
- log
- @Lint.
- @
- text
- @d11 1
- a11 1
- static char rcsid[] = "$Header: truncate.c,v 1.1 88/06/19 14:32:09 ouster Exp $ SPRITE (Berkeley)";
- d29 2
- a30 1
- * UNIX_SUCCESS is returned.
- d43 9
- a51 1
- return(Fs_Truncate(path, (int) length));
- @
-
-
- 1.1
- log
- @Initial revision
- @
- text
- @d11 1
- a11 1
- static char rcsid[] = "$Header: sigsetmask.c,v 1.1 86/04/17 15:21:06 douglis Exp $ SPRITE (Berkeley)";
- d42 1
- a42 1
- return(Fs_Truncate(path, length));
- @
-